package com.wypiwyl.footastic.view;

import android.graphics.Canvas;
import android.graphics.Point;
import android.graphics.Rect;
import android.util.Log;

public abstract class AbstractLayer implements Layer {

    // declaration log
    private static final String TAG = "AbstractLayer";
    
    @Override
    public abstract void onDraw(Canvas canvas);

    @Override
    public abstract Rect getLayout();

    @Override
    public boolean isInside(Point point) {
        return getLayout().contains(point.x, point.y);
    }

    @Override
    public int getWidthLayer() {
        return getLayout().width();
    }

    @Override
    public int getHeightLayer() {
        return getLayout().height();
    }

    @Override
    public int getLeft() {
        return getLayout().left;
    }

    @Override
    public int getTop() {
        return getLayout().top;
    }

    @Override
    public int getRight() {
        return getLayout().right;
    }

    @Override
    public int getBottom() {
        return getLayout().bottom;
    }

}
